from sqlobject import *
#SQLite Connection
#conn = 'sqlite:///home/rbhalotia/testdb'
#Postgres Connection
conn = 'postgres://ravi@shell2.adytum.us/benchmark'

#MySQL Connection
conn = 'mysql://ravi@localhost/testdb'

class Person(SQLObject):

    _connection = conn

    firstName = StringCol()
    middleInitial = StringCol(length=1, default=None)
    lastName = StringCol()

if __name__ == "__main__":
    Person.createTable(ifNotExists=True)
    counter = 0
    while (counter < 1000):
        p = Person(firstName="John", lastName="Doe")
        counter = counter + 1;
